/*
 * @ : Copyright (c) 2021 Phytium Information Technology, Inc.
 *
 * SPDX-License-Identifier: Apache-2.0.
 *
 * @Date: 2021-04-27 15:31:57
 * @LastEditTime: 2021-07-28 17:28:04
 * @Description:  Description of file
 * @Modify History:
 * * * Ver   Who        Date         Changes
 * * ----- ------     --------    --------------------------------------
 */

#include "ft_can.h"
#include "parameters.h"

extern FCanConfig fcan_config[FT_CAN_NUM];

FCanConfig *FCanLookupConfig(u32 instanceid)
{
    FCanConfig *cfgptr = NULL;
    u32 index;

    for (index = 0; index < (u32)FT_CAN_NUM; index++)
    {
        if (fcan_config[index].instanceid == instanceid)
        {
            cfgptr = &fcan_config[index];
            break;
        }
    }
    return (FCanConfig *)cfgptr;
}
